package cn.edu.cqupt.until;

import com.alibaba.fastjson.JSON;

/**
 * @author Andrew
 * @date 2018/1/26
 */
public abstract class AbstractResult {
    /**
     * 状态码，是否成功
     */
    private boolean success;

    /**
     * 错误代码
     */
    private String errorCode;

    /**
     * 错误描述
     */
    private String description;

    public boolean isSuccess() {
        return success;
    }

    public void setSuccess(boolean success) {
        this.success = success;
    }

    public String getErrorCode() {
        return errorCode;
    }

    public void setErrorCode(String errorCode) {
        this.errorCode = errorCode;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }
    public String toJSONString(){
        return JSON.toJSONString(this);
    }
}
